package com.seaengine.valueobject
{

	public class EquipStrengthenRuleVo extends BaseVo
	{
		public function EquipStrengthenRuleVo(min:int, max:int, probability:int, margin:int, money:int, ingot:int)
		{
			super();
			this.min = min;
			this.max = max;
			this.probability = probability;
			this.margin = margin;
			this.money = money;
			this.ingot = ingot;
		}

		/**
		 *		<id max="4"
					min="1"
					probability="800"
					margin="40"
					money="1"
					ingot="0">1</id>
		 */
		public var min:int;
		public var max:int;
		public var probability:int;
		public var margin:int;
		public var money:int;
		public var ingot:int;

		public function isIn(level:int):Boolean
		{
			if (level >= min && level <= max)
				return true;
			return false;
		}

		/**
		 * 判断是否使用level强化等级的装备
		 * @param level
		 * @return 
		 * 
		 */		
		public function isFit(level:int):Boolean
		{
			if (level < max)
				return true;
			return false;
		}
	}
}
